<?php
namespace Org\Util;

class SMS1 {

	private $http = '';
	private $uid = '23272980';
	private $pwd = '8d91efee0350711027672437d1939548';
	
        public function __construct(){
            //$this->uid = C('SMS_UID');
            //$this->pwd = C('SMS_PWD');
        }
        
	function sendSMS($mobile,$tpl,$param)
	{
		Vendor("Dayu.TopSdk");
		$client = new \TopClient($this->uid,$this->pwd);
		$req = new \AlibabaAliqinFcSmsNumSendRequest;
		$req->setExtend("");
		$req->setSmsType("normal");
		//此处是签名，改成飞果旅行
		$req->setSmsFreeSignName("青藤微社区");
		$req->setSmsParam($param);
		$req->setRecNum($mobile);
		$req->setSmsTemplateCode($tpl);
		$resp = $client->execute($req, $sessionKey);
		return $resp;
		/*
		object(SimpleXMLElement)#10 (2) { ["result"]=> object(SimpleXMLElement)#9 (2) { ["model"]=> string(26) "100200717148^1100175108465" ["success"]=> string(4) "true" } ["request_id"]=> string(13) "10fk37r8dfgjq" }
		*/
	}

	

}